<template>
	<view class="My">
		<myLogin v-if="!token"></myLogin>
		<myUserinfo v-else></myUserinfo>
	</view>
</template>

<script>
	import badgeMix from '@/mixins/tabbar-badge.js'
	import {
		mapGetters,
		mapState,
		mapMutations
	} from 'vuex'

	import myLogin from '@/components/my_login/my_login.vue'
	import myUserinfo from '@/components/my_userinfo/my_userinfo.vue'

	export default {
		data() {
			return {

			};
		},
		// 将 badgeMix 混入到当前的页面中进行使用
		mixins: [badgeMix],

		computed: {
			...mapState('m_user', ['token'])
		},

		components: {
			myLogin,
			myUserinfo
		}
	}
</script>

<style lang="scss">
.My {
	height: 100%;
}
</style>
